using System.Windows.Forms;
using DownloadMailTask.Interfaces;
using Microsoft.SqlServer.Dts.Runtime;

namespace DownloadMailTask
{
    public partial class DownloadMailTaskEditor : Form
    {
        private TaskHost _taskHost;
        private IDownloadMailTask _mailTask;

        public DownloadMailTaskEditor(TaskHost taskHost)
        {
            InitializeComponent();
            this.Icon = new System.Drawing.Icon(typeof(DownloadMailTask), "icon.ico");
            this.ShowIcon = true;
            _taskHost = taskHost;
            _mailTask = (IDownloadMailTask)taskHost.InnerObject;
            downloadTaskPropertyGrid.SelectedObject = _mailTask;
            this.Text = taskHost.Name;
        }
    }
}